<?php

namespace app\rongcui\controller;

use app\rongcui\model\AreasModel;
use cmf\controller\HomeBaseController;

class AreasController extends HomeBaseController
{
    function area()
    {
        $areaid = $this->request->param('areaid',0,'intval');
        $areaModel = new AreasModel();
        $lists = $areaModel
            ->where([
                'parentid' => $areaid
            ])
            ->field('areaid,name')
            ->select();
        $this->success('成功!','',$lists);
    }
}